package com.panda.web.controller.commons;

import com.panda.common.core.domain.R;
import com.panda.web.domain.vo.commons.SomeoneVO;
import com.panda.web.domain.vo.commons.someone.TongYongVO;
import com.panda.web.entity.commons.Addrs;
import com.panda.web.entity.commons.GraduateEdition;
import com.panda.web.service.commons.SomeoneService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/someone")
public class SomeoneController {

    @Autowired
    private SomeoneService someoneService;


    //获取专业列表
    @GetMapping("/major")
    public R majorList(SomeoneVO vo) {
        List<GraduateEdition> voList = someoneService.majorList(vo);
        return R.ok(voList,"ok");
    }
    //获取地区列表 前台搜索获取市
    @GetMapping("/addrs")
    public R addrsList(SomeoneVO vo) {
        List<Addrs> voList = someoneService.addrs(vo);
        return R.ok(voList,"ok");
    }
    //获取岗位类型

    @GetMapping("/nature")
    public R naturecnList(SomeoneVO vo) {
        List<TongYongVO> voList = someoneService.naturecnList(vo);
        return R.ok(voList,"ok");
    }
    //获取学历
    @GetMapping("/education")
    public R educationList(SomeoneVO vo) {
        List<TongYongVO> voList = someoneService.educationList(vo);
        return R.ok(voList,"ok");
    }


}
